/*
 * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The OpenAirInterface Software Alliance licenses this file to You under
 * the OAI Public License, Version 1.1  (the "License"); you may not use this
 * file except in compliance with the License. You may obtain a copy of the
 * License at
 *
 *      http://www.openairinterface.org/?page_id=698
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *-------------------------------------------------------------------------------
 * For more information about the OpenAirInterface (OAI) Software Alliance:
 *      contact@openairinterface.org
 */
/**
 * Nudr_DataRepository API OpenAPI file
 * Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB,
 * ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
 *
 * The version of the OpenAPI document: 2.1.2
 *
 *
 * NOTE: This class is auto generated by OpenAPI Generator
 * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
 * the class manually.
 */

#include "UpuInfo.h"

namespace oai::udr::model {

UpuInfo::UpuInfo() {
  m_UpuRegInd = false;
  m_UpuAckInd = false;
  m_UpuMacIausf = "";
  m_UpuMacIausfIsSet = false;
  m_CounterUpu = "";
  m_CounterUpuIsSet = false;
  m_ProvisioningTime = "";
}

UpuInfo::~UpuInfo() {}

void UpuInfo::validate() {
  // TODO: implement validation
}

void to_json(nlohmann::json &j, const UpuInfo &o) {
  j = nlohmann::json();
  j["upuDataList"] = o.m_UpuDataList;
  j["upuRegInd"] = o.m_UpuRegInd;
  j["upuAckInd"] = o.m_UpuAckInd;
  if (o.upuMacIausfIsSet())
    j["upuMacIausf"] = o.m_UpuMacIausf;
  if (o.counterUpuIsSet())
    j["counterUpu"] = o.m_CounterUpu;
  j["provisioningTime"] = o.m_ProvisioningTime;
}

void from_json(const nlohmann::json &j, UpuInfo &o) {
  j.at("upuDataList").get_to(o.m_UpuDataList);
  j.at("upuRegInd").get_to(o.m_UpuRegInd);
  j.at("upuAckInd").get_to(o.m_UpuAckInd);
  if (j.find("upuMacIausf") != j.end()) {
    j.at("upuMacIausf").get_to(o.m_UpuMacIausf);
    o.m_UpuMacIausfIsSet = true;
  }
  if (j.find("counterUpu") != j.end()) {
    j.at("counterUpu").get_to(o.m_CounterUpu);
    o.m_CounterUpuIsSet = true;
  }
  j.at("provisioningTime").get_to(o.m_ProvisioningTime);
}

std::vector<UpuData_2> &UpuInfo::getUpuDataList() { return m_UpuDataList; }
void UpuInfo::setUpuDataList(std::vector<UpuData_2> const &value) {
  m_UpuDataList = value;
}
bool UpuInfo::isUpuRegInd() const { return m_UpuRegInd; }
void UpuInfo::setUpuRegInd(bool const value) { m_UpuRegInd = value; }
bool UpuInfo::isUpuAckInd() const { return m_UpuAckInd; }
void UpuInfo::setUpuAckInd(bool const value) { m_UpuAckInd = value; }
std::string UpuInfo::getUpuMacIausf() const { return m_UpuMacIausf; }
void UpuInfo::setUpuMacIausf(std::string const &value) {
  m_UpuMacIausf = value;
  m_UpuMacIausfIsSet = true;
}
bool UpuInfo::upuMacIausfIsSet() const { return m_UpuMacIausfIsSet; }
void UpuInfo::unsetUpuMacIausf() { m_UpuMacIausfIsSet = false; }
std::string UpuInfo::getCounterUpu() const { return m_CounterUpu; }
void UpuInfo::setCounterUpu(std::string const &value) {
  m_CounterUpu = value;
  m_CounterUpuIsSet = true;
}
bool UpuInfo::counterUpuIsSet() const { return m_CounterUpuIsSet; }
void UpuInfo::unsetCounterUpu() { m_CounterUpuIsSet = false; }
std::string UpuInfo::getProvisioningTime() const { return m_ProvisioningTime; }
void UpuInfo::setProvisioningTime(std::string const &value) {
  m_ProvisioningTime = value;
}

} // namespace oai::udr::model
